<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 500px;
            height: 400px;
            /* background-color: pink;
            background-image: url(./image/cat.jpg);
            background-repeat: no-repeat; */
            /* cotain 保障图片的完整性，显示整张图片，盒子有了空白的地方 */
            /* background-size: contain; */
            /* cover 图片铺满整个盒子 */
            background-size: cover;
            background: pink url(./image/cat.jpg) no-repeat fixed 0 0;
        }
    </style>
</head>
<body>
    <div class="box">
        
    </div>
</body>
</html>